Self-applicable C Program Specialization

نویسنده

  • Lars Ole Andersen
چکیده

A partial evaluator is an automatic program transformation tool. Given as input a general program and part of its input, it can produce a specialized version. If the partial evaluator is self-applicable, program generators can be made. The goal is efficiency : the specialized program often runs an order of magnitude faster than the general one. We consider partial evaluation of the pragmatic oriented imperative C programming language. New problems studied includes partially static data structures, non-local static side-effects under dynamic control, and a restricted use of pointers. We define a Core C language, derive a two-level Core C language with explicit binding times, and formulate well-annotatedness conditions. Function specialization and code generation is described in terms of the two-level Core C language. An implementation of the C partial evaluator has been made. Some experimental results are given.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

C Program Specialization Master ’ s

Automatic program specialization has numerous application areas ranging from specialization of scientific computation to automatic compiler generation. During the last decade, several automatic partial evaluators have been developed and demonstrated their usefulness. However, none of these have both been for a typed imperative language and self-applicable. The main content of this thesis is the...

متن کامل

Efficient Multi-level Generating Extensions for Program Specialization

Multiple program specialization can stage a computation into several computation phases. This paper presents an eective solution for multiple program specialization by generalizing conventional o-line partial evaluation and integrating the \cogen approach" with a multi-level binding-time analysis. This novel \multi-cogen approach" solves two fundamental problems of self-applicable partial evalu...

متن کامل

Reasoning about Hierarchies of Online Program Specialization Systems

We present the language S Graph n the core of a multi level metaprogramming environment for exploring foundational issues of self applicable online program specialization We illustrate how special purpose S Graph n primitives can be used to obtain an e cient and conceptually simple encoding of programs as data objects The key feature of the encoding scheme is the use of nu merical indices which...

متن کامل

Generalization in Hierarchies of Online Program Specialization Systems

In recent work, we proposed a simple functional language S-graph-n to study metaprogramming aspects of self-applicable online program specialization. The primitives of the language provide support for multiple encodings of programs. An important component of online program specialization is the termination strategy. In this paper we show that such a representation has the great advantage of sim...

متن کامل

Optimization by Run-time Specialization for Sparse Matrix-Vector Multiplication (Submitted for publication)

Run-time specialization is the process of generating programs based on information available only at run time. This technique has the potential of generating highly efficient codes, at the expense of the overheads of the run-time code generation. It is applicable when some input data is used repeatedly while other input data varies. In this paper we explore the potential for obtaining speedups ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1992